package cn.edu.scau.cmi.dengyu.factory;

import cn.edu.scau.cmi.dengyu.domain.factory.Accident;

public class AccidentFactory {
	public AccidentFactory() {
	
	}
	
	public Accident createAccident() {
		return new Accident();
	}
	
	public static AccidentFactory selectFactory(String typeOfAccidentFactory) {
		switch(typeOfAccidentFactory){
		case "司机受伤":return new DriverInjuredFactory();
		case "汽车损坏":return new CarDamagedFactory();
		case "人员伤亡":return new PeopleInjuredFactory();
		case "多种事故":return new MultipleAccidentsFactory();

		}
		
		return null;
	}
}
